<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .box {

            height: 500px;
            width: 500px;
            background-color: tomato;
            font-size: 40px;
            /*定义使用flex布局*/
            display: flex;
            /*垂直布局*/
            flex-direction: column;
            /* 水平居中 */
            justify-content: center;
            /* 垂直居中 */
            align-items: center;
        }

    </style>
</head>
<body>
<div class="box">
<span style="background-color: red">bbb</span>
</div>
</body>
</html>